package com.zmn.plat.admin.controller.expressage;// package com.zmn.plat.admin.controller.expressage;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.zmn.plat.admin.controller.PlatBaseController;
import com.zmn.plat.business.interfaces.expressage.ExpressageService;

/**
 * @author quanjic
 * @version v1.0
 * @since 2018/11/28 9:17
 **/
@RestController
@RequestMapping(value = "/express")
public class ExpressageController extends PlatBaseController {

    @Autowired
    private ExpressageService expressageService;

    /**
     * 查询物流信息
     *
     * @param company
     *            快递公司
     * @param code
     *            快递单号
     * @return
     */
    @RequestMapping(value = "find", produces = "application/json; charset=utf-8")
    public Object find(@RequestParam("company") String company, @RequestParam("code") String code) {
        return expressageService.find(company, code);
    }

    @RequestMapping(value = "findCompany", produces = "application/json; charset=utf-8")
    public Object findCompany(@RequestParam("code") String code) {
        return expressageService.findCompany(code);
    }

}
